If your code extends GroovyInjectionBase (as in the example above) these API's will be available to you:
/**
* Halts execution and posts an error message.
*
* @param inFailureMessage message to be posted.
* @throws BizViolation
*/
public void fail(String inFailureMessage)
/**
* Sends XML to the configured outbound JMS queue.
*
* @param inXml A well-formed XML Element represented as a String.
*/
public void sendXml(String inXml)
/**
* Writes a message to the system log.
*
* @param inMessage String containing the message to be logged.
*/
public void log(String inMessage)
/**
* Writes a message to the system log at warn level.
*
* @param inMessage String containing the message to be logged.
*/
public void logWarn(String inMessage)
/**
* Writes a message to the system log at info level.
*
* @param inMessage String containing the message to be logged.
*/
public void logInfo(String inMessage)
/**
* Finds a UnitFacilityVisit for a containerized Unit by container number.
*
* @param inCtrId The container number
* @return the currently active UnitFacilityVisit for the container, if any.
* @throws BizViolation if the UFV can not be found.
*/
public UnitFacilityVisit findActiveUfv(String inCtrId)
/**
* Performs a STUFF. Does not record an event.
*
* @param inEmptyUfv UFV for the Empty Unit to be stuffed
* @param inBreakBulkUfv UFV for the Break Bulk Unit to be stuffed (can be null)
* @return UFV for the new full Unit
* @throws BizViolation
*/
public UnitFacilityVisit stuffUfv(UnitFacilityVisit inEmptyUfv, UnitFacilityVisit inBreakBulkUfv)
/**
* Performs a STRIP, and records an event.
*
* @param inFullUfv UFV for the full Unit to be stripped
* @param inBreakBulkId ID for the new Breakbulk Unit (if null, none will be created)
* @param inNote note to record in the STRIP event
* @return the UFV for the newly created empty unit
* @throws BizViolation
*/
public UnitFacilityVisit stripUfvAndRecordEvent(UnitFacilityVisit inFullUfv, String inBreakBulkId, String inNote)
/**
* This method is to be used by the custom code (only Groovy, currently) to record an error that user can override.
* Not all plugins need to use overrideable errors.
* Logs an error if overrideable errors are not supported for this plugin
* Currently this mechanism is only tested for Groovy plugins that are called in the Mobile JSF RDT applications.
*
* @param inFailureMessage The message that custom code wants logged.
*/
public void registerOverridableError(String inFailureMessage)
/**
* This method allows the custom code to check if custom code is
* invoked as a result of FORCE (override) button pressed by the user.
* @return true if the custom code is being invoked as a result of FORCE button being pressed. false otherwise.
*/
public boolean ignoreAllOverrideableErrors()
/**
* Loads an instance of a Class from the general Groovy class cache. Allows customers access
* to the created routines (plugins) that can be shared by different areas in the product.
* code.
*
* @param inClassName The (simple) name of the Groovy class. Does not include any package name.
* @return an instance of the class of name inClassName.
* @throws BizViolation
*/
/**
* Executes HTTP POST of the JSON string to the URL.
* @param inUrl The destination URL of the SMS.
* @param inJsonString The JSON message to post to the URL.
* @return True if post is successful, otherwise false.
*/
public boolean doHttpPostJson(String inUrl, String inJsonString)
/**
* Converts the properties map to a JSON string and executes an HTTP POST to the URL.
* @param inUrlString The destination URL of the SMS.
* @param inProperties The properties (map <string> <string>)for the message. The first is the name of the property. The second is the value of the property. Refer to the third-party application’s documentation for the properties. map<string, string> contains properties for message
* @return True if post is successful, otherwise false.
*/
public boolean sendSMSMessage(String inUrlString, Map<String, String> inProperties)
}
/**
* Wraps the message string in JSON markup and sends the message string to the URL using HTTP POST.
* @param inUrlString The destination URL of the SMS.
* @param inMessage The message to post to the URL.
* @return True if post is successful, otherwise false.
*/
public boolean sendSMSMessage(String inUrlString, String inMessage)